Optical scanners are popular and useful peripheral devices for computers. Optical scanners are used to take objects containing printed information (such as text, illustrations or photographs) and convert the information into a digital form that a computer can use. In general, a user places objects to be scanned onto a platen of the scanner. A scanner head is passed over the platen area and the resultant image is divided into a plurality of pixels. Each pixel location is assigned a value that is dependent on the color of the pixel. The resulting matrix of bits (called a bit map) can then be stored in a file, displayed on a monitor, and manipulated by software applications. The resulting scanned image contains both data pixels, which are pixels that are located on the objects, and background pixels, which are pixels that are the color of the background. Typically, the background color is the color of the lid of the scanner.
In order to automate the segmentation process, an automatic detection and extraction technique may be used to detect and extract multiple objects in scanned images. One such technique is described in U.S. Ser. No. 10/354,500 by Herley entitled “System and method for automatically detecting and extracting objects in digital image data” filed on Jan. 29, 2003. This particular object detection and extraction technique searches for gaps in the histograms of rows and columns of a scanned image containing multiple objects. A gap means that there are no data pixels going across that row or column of the image. These gaps are found by classifying pixels as either data pixels or background pixels and repeatedly decomposing the image into a case with a single object and a background. Once the decomposition is complete, the single object case can easily be solved. Gaps are determined by taking profiles of a histogram. A data pixel is defined as a pixel that differs by at least a threshold from the background color.
Any detection and extraction technique needs to define a rectangle that bounds the object in the scanned image data in order to be able to extract that object. When the object in the scanned image data is perfectly rectangular and contains neat edges and corners, the detection and extraction techniques work extremely well. However, detection and extraction becomes markedly more difficult when the object is crumpled, torn, folded, creased or otherwise deformed. Such “noisy” objects are no longer perfectly rectangular and lack well-defined edges and corners. By way of example, this can occur when objects such as receipts are placed in a wallet, purse, or pocket, leading to creasing, tearing, or both. As another example, torn sheets of paper or scraps of paper may be contained in the scanned image data. Because detection and segmentation techniques typically search for edges or corners of objects, noisy objects can lead to errors and inaccuracies.
As stated above, one way to define a rectangle around each object is to have a user to manually select the boundaries of each object. However, process of manually segregating each object within the scanned image is a laborious task. It would be convenient and desirable to automatically find rectangles that bound objects within scanned image data rather than requiring a user to do so. Therefore, what is needed is a simple, efficient, robust and accurate system and method for automatically finding a rectangle that bounds one or more noisy objects in scanned image data.